package com.hangzhou.xyj.net.request;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.hangzhou.xyj.net.request.base.BaseRequest;
import com.hangzhou.xyj.utils.constants.API;

/**
 * Created by yaohuix on 2016/4/7  16:55
 * <p/>
 * 说明：删除评论 请求
 */
public class DeleteCommentReq extends BaseRequest {
    /**
     * 构造方法
     *
     * @param id 评论的id
     * @return
     * @author yaohuix
     * @date 2016/4/7 16:57
     */
    public DeleteCommentReq(int id) {
        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty("id", id);
        add("data", new Gson().toJson(jsonObject));
    }

    @Override
    public String getUrl() {
        return API.DELETE_COMMENT;
    }
}
